package com.google.code.irouter.utils;

import javax.cache.Cache;

public final class CacheUtil {

	private static Cache CACHE;

	public static Cache getCACHE() {
		return CACHE;
	}

	public static void setCACHE(Object object) {
		CACHE = (Cache) object;
	}

	public static Object get(String key) {
		return CACHE.get(key);
	}

	@SuppressWarnings("unchecked")
	public static Object put(String key, Object value) {
		return CACHE.put(key, value);
	}
	
	public static void remove(String key) {
		CACHE.remove(key);
	}

	public static boolean containsKey(String key) {
		return CACHE.containsKey(key);
	}

}
